package lab02.Test04;

import com.sun.org.apache.xpath.internal.SourceTree;

/**
 * Created by Administrator on 2017/10/13.
 */
public class Staff {
    private String name;
    private String number;
    private int salary;
    private double salary_increase;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getNumber() {
        return number;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary_increase(double salary_increase) {
        this.salary_increase = salary_increase;
    }

    public double getSalary_increase() {
        return salary_increase;
    }

    public double salary_Growth(int salary, double sum) {
        double salary_Rate;
        salary_Rate = (sum - salary) / salary;
        return salary_Rate;
    }

    public double sum_salary(int salary, double salary_increase) {
        double sum;
        sum = salary + salary * salary_increase;
        return sum;
    }
    Staff(){
        System.out.println("姓名  "+"员工编号"+"  "+"工资   "+"增长额");
    }
    public void taff() {
        System.out.println(getName() + "  " + getNumber() + "    " + getSalary() + "    " + getSalary_increase());
        System.out.print("总工资：");
        System.out.println(sum_salary(getSalary(), getSalary_increase()));
        System.out.print("增长额：");
        System.out.println(salary_Growth(getSalary(), sum_salary(getSalary(), getSalary_increase())));
    }
}
